package com.alinesno.cloud.common.web.basic.auth.enable;

import java.util.ArrayList;
import java.util.List;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import com.alinesno.cloud.common.core.config.DateConverterConfig;
import com.alinesno.cloud.common.web.basic.auth.advice.DatagridResponseBodyAdvice;
import com.alinesno.cloud.common.web.basic.auth.config.HttpBasicSecurityConfig;
import com.alinesno.cloud.common.web.basic.auth.config.ThymeleafConfig;
import com.alinesno.cloud.common.web.basic.auth.controller.HttpBasicDashboardController;
import com.alinesno.cloud.common.web.basic.auth.controller.MenusController;
import com.alinesno.cloud.common.web.basic.auth.controller.PageJumpController;

/**
 * 引入自动类
 * @author WeiXiaoJin
 * @sine 2019年4月5日 下午3:34:07
 */
public class HttpBasicAuthConfigurationSelector implements ImportSelector {

	@Override
	public String[] selectImports(AnnotationMetadata importingClassMetadata) {
		List<String> importBean = new ArrayList<String>() ; 
		
		importBean.add(HttpBasicSecurityConfig.class.getName()) ; 
		importBean.add(PageJumpController.class.getName()) ; 
		importBean.add(HttpBasicDashboardController.class.getName()) ; 
		importBean.add(MenusController.class.getName()) ; 
		
		// 添加实体
		importBean.add(ThymeleafConfig.class.getName()) ; 
		importBean.add(DateConverterConfig.class.getName()) ; 
		importBean.add(DatagridResponseBodyAdvice.class.getName()) ; 
		
		return importBean.toArray(new String[] {}) ;
	}

}
